//
//  TopicCell.m
//  NeteaseNewsLY
//
//  Created by dllo on 16/1/19.
//  Copyright © 2016年 www.lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "TopicCell.h"

@implementation TopicCell

- (void)dealloc
{
    [_bigKuang release];
    [_backpicture release];
    [_headpicture release];
    [_name release];
    [_title release];
    [_concernCount release];
    [_classification release];
    [_doing release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.bigKuang = [[UIImageView alloc] init];
        [self.contentView addSubview:_bigKuang];
        [_bigKuang release];
        
        self.backpicture = [[UIImageView alloc] init];
        [self.bigKuang addSubview:_backpicture];
        [_backpicture release];
        
        self.headpicture = [[UIImageView alloc] init];
        [self.backpicture addSubview:_headpicture];
        [_headpicture release];
        
        self.name = [[UILabel alloc] init];
        [self.backpicture addSubview:_name];
        [_name release];
        
        self.title = [[UILabel alloc] init];
        [self.bigKuang addSubview:_title];
        [_title release];
        
        self.concernCount = [[UILabel alloc] init];
        [self.bigKuang addSubview:_concernCount];
        [_concernCount release];
        
        self.classification = [[UILabel alloc] init];
        [self.bigKuang addSubview:_classification];
        [_classification release];
        
        self.doing = [[UILabel alloc] init];
        [self.bigKuang addSubview:_doing];
        [_doing release];
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    
    _bigKuang.frame = CGRectMake(WIDTH * 10, HEIGHT * 10, WIDTH * 355, HEIGHT * 305);
    
    _backpicture.frame = CGRectMake(0, 0, WIDTH * 355, HEIGHT * 199);
    
    _headpicture.frame = CGRectMake(WIDTH * 15, HEIGHT * 160, WIDTH * 30, HEIGHT * 30);
    // 圆角
    _headpicture.layer.cornerRadius = 15;
    _headpicture.clipsToBounds = YES;
    
    _name.frame = CGRectMake(WIDTH * 60, HEIGHT * 160, WIDTH * 100, HEIGHT * 30);
    _name.textColor = [UIColor whiteColor];
    
    
    _title.frame = CGRectMake(WIDTH * 10, HEIGHT * 205, WIDTH * 335, HEIGHT * 50);
    _title.numberOfLines = 0;
    _title.font = [UIFont systemFontOfSize:15];
    
    _concernCount.frame = CGRectMake(WIDTH * 15, HEIGHT * 265, WIDTH * 90, HEIGHT * 20);
    _concernCount.font = [UIFont systemFontOfSize:12];
    
    _classification.frame = CGRectMake(WIDTH * 105, HEIGHT * 265, WIDTH * 50, HEIGHT * 20);
    _classification.font = [UIFont systemFontOfSize:12];
    _classification.textColor = [UIColor blueColor];
    
    _doing.frame = CGRectMake(WIDTH * 145, HEIGHT * 265, WIDTH * 60, HEIGHT * 20);
    _doing.text = @" | 进行中";
    _doing.font = [UIFont systemFontOfSize:12];
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
